import { createRouter, createWebHashHistory } from 'vue-router';
import { constantRoutes } from './routes';
// 创建路由器实例
const router = createRouter({
  history: createWebHashHistory(), // 路由模式为哈希模式
  routes: constantRoutes,
  scrollBehavior: () => ({ left: 0, top: 0 }), // 定义滚动行为
});

export default router;
